<% if is_logged_in?  %>
  	<div id="me" class="tip_box">
		<dl>
			<dt><%= link_to image_tag("/images/me.jpg"),:controller => "users", :action => "show", :id => logged_in_user %></dt>
			<dd>
				<%= link_to logged_in_user.username,user_path(logged_in_user)%>
				<%= button_to "注销", { :controller => "accounts", :action => "logout" },:confirm => "立即注销当前用户?", :method => :post  %>
			</dd>
			<dd>我的签名</dd>
		</dl>
	</div>
<% else %>	
	<div id="login" class="tip_box">
		<div class="title">欢迎登陆</div>
		<% form_for :user, :url => {:controller=>'accounts', :action => 'authenticate' } do |f| -%>
			<div class="tips"></div>
			<p>
				<%= f.label :username, "用户名" %>
				<%= f.text_field :username,:class=>"userpass", :size => 24 %>
			</p>
			<p>
				<%= f.label :password, "密&nbsp;&nbsp;&nbsp;&nbsp;码" %>
				<!-- <input type="password" name="j_password" class="userpass" size="24"/> -->
				<%= f.password_field :password,:class=>"userpass", :size => 24 %>
			</p>
			<p class="btn">
				<!-- <input type="submit" value="登录" class="btn_login"/> -->
				<%= submit_tag '立即登录' %>
				<%= link_to '免费注册',new_user_path %>
				<!-- <a href="user/register" target="_blank" class="reg">免费注册</a> -->
			</p>
			<span class="remember">
				<%=check_box_tag("rememberme", value = "1", checked = true)%>
				<label for="RemenberMe">记住我</label>
			</span>
			<a href="" target="_blank" class="forget" name="forget">忘记密码？</a>
		<% end %>
	</div>
<% end %>
				

<div class="tip_box">
	<h2>消息或者列表</h2>
	<p class="tips">这里是消息消息消息消息消息消息消息消息
	</p>
	<a href="#" class="read_more">read more</a>
</div>




					